<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class Gmess extends Controller {

    public function __construct($ControllerName, $Action, $QueryString) {
        parent::__construct($ControllerName, $Action, $QueryString);
        $this->loadModel('Db');
    }

    public function view($Query) {
        $id = (int) $Query->id;
        $page = $this->Db->query("SELECT * FROM `gmess_page` WHERE `id` = $id;");
        $page = $page[0];
        $page['createtime'] = date("Y-n-d", strtotime($page['createtime']));
        $this->Smarty->assign('page', $page);
        $this->show();
    }

}
